<?php $view = $this; if(1!=1)$view = new View(); ?>
<ul class="nav">
<?php $accounttypename = '-'; $i = 0;?>
<?php foreach($view->LeftAccount as $k=>$v):?>
<?php $i++;?>
<?php if($accounttypename == '-'):$accounttypename = $v['AccountTypeName'];?>
	<li class="">
		<a class="recordable open" href="#"><?php echo empty($accounttypename) ? '其他' : $accounttypename;?></a>
		<ul>
			<li class=""><a href="?m=record&a=rlist&aid=<?php echo $v['AID']?>" style="padding-left:0; width:98%; position: relative;"><span style="position: absolute; left: 15px;"><?php echo $v['AccountName']?></span><span style="position: absolute; right: 5px;"> <?php echo $v['TotalAssets']?></span></a></li>
<?php elseif($accounttypename != $v['AccountTypeName']):$accounttypename = $v['AccountTypeName'];?>
        </ul>
    </li>
    <li class="">
		<a class="recordable open" href="#"><?php echo empty($accounttypename) ? '其他' : $accounttypename;?></a>
		<ul>
			<li class=""><a href="?m=record&a=rlist&aid=<?php echo $v['AID']?>" style="padding-left:0; width:98%; position: relative;"><span style="position: absolute; left: 15px;"><?php echo $v['AccountName']?></span><span style="position: absolute; right: 5px;"> <?php echo $v['TotalAssets']?></span></a></li>
<?php elseif($i == count($view->Account)):?>
			<li class=""><a href="?m=record&a=rlist&aid=<?php echo $v['AID']?>" style="padding-left:0; width:98%; position: relative;"><span style="position: absolute; left: 15px;"><?php echo $v['AccountName']?></span><span style="position: absolute; right: 5px;"> <?php echo $v['TotalAssets']?></span></a></li>
		</ul>
	</li>
<?php else:?>
    		<li class=""><a href="?m=record&a=rlist&aid=<?php echo $v['AID']?>" style="padding-left:0; width:98%; position: relative;"><span style="position: absolute; left: 15px;"><?php echo $v['AccountName']?></span><span style="position: absolute; right: 5px;"> <?php echo $v['TotalAssets']?></span></a></li>
<?php endif;?>
<?php endforeach;?>
</ul>
<!-- 
<ul class="nav">
	<li class="">
		<a class="recordable open" href="#">现金</a>
		<ul>
			<li class=""><a href="#">我的现金1<span> 200.00</span></a><span class="normal">&nbsp;</span></li>
			<li class="selected"><a href="#">我的现金2<span> 200.00</span></a><span class="normal">&nbsp;</span></li>
			<li class=""><a href="#">我的现金3<span> 200.00</span></a><span class="normal">&nbsp;</span></li>
		</ul>
	</li>
	<li class="">
		<a class="recordable open" href="#">活期存款</a>
		<ul>
			<li class=""><a href="#">农业银行<span> 200.00</span></a><span class="normal">&nbsp;</span></li>
			<li class=""><a href="#">工商银行<span> 200.00</span></a><span class="normal">&nbsp;</span></li>
		</ul>
	</li>
</ul>
-->